﻿@model SysCompany
<div class="ui-cell">
	<label>公司名称</label>
	@Html.TextBox("CompanyCaption", Model.Caption)
</div>
<div class="ui-cell">
	<label>公司地址</label>
	@Html.TextBox("CompanyAddress", Model.Address)
</div>
@if (Model.SysCompanyContact.Any())
{
	var tele = Model.SysCompanyContact.First().Telephone;
	<div class="ui-cell">
		<label>联系人</label>
		<select id="CompanyContact" name="CompanyContact" onchange="setMobile()">
			@foreach (var item in Model.SysCompanyContact)
   {
				<option value="@item.Contact" data-mobile="@item.Telephone">@item.Contact @item.Telephone</option>
   }
		</select>
		@Html.Hidden("CompanyMobile",tele)
	</div>
	<script type="text/javascript">
		function setMobile() {
			$("#CompanyMobile").val($("#CompanyContact option:selected").attr("data-mobile"));
		}
	</script>
}
else
{
	<div class="ui-cell">
		<label>联系人</label>
		@Html.TextBox("CompanyContact")
	</div>
	<div class="ui-cell">
		<label>电话</label>
		@Html.TextBox("CompanyMobile")
	</div>
}
<div class="ui-cell">
	<label>招聘岗位</label>
	@Html.DropDownList("CompanyEmployeeSysNo", Model.SysCompanyEmployee.Select(p => new SelectListItem { Value = p.ID.ToString(), Text = p.Caption }))
</div>
<div class="ui-cell">
	<label>面试日期</label>
	@Html.TextBox("InterviewDate", string.Format("{0:yyyy-MM-dd}", DateTime.Now))
</div>
